import request from '@/utils/request'

/**
 * 登录接口
 * @param {Object} data：{mobile, password}
 * @return Promise
 */
export const loginAPI = (data) => {
  return request({
    url: '/sys/login',
    method: 'POST',
    data
    // axios 默认携带请求头 Content-Type: 'application/json'
  })
}

/**
 * 获取 - 用户基本资料接口
 * @return Promise
 */
export const getProfileAPI = () => {
  return request({
    url: '/sys/profile',
    method: 'POST'
  })
}

/**
 * @description: 获取员工详细信息
 * @param {*} id 员工id
 * @return {*}
 */
export const getUserAPI = (id) => {
  return request({
    url: `/sys/user/${id}`
  })
}
